package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacRoleDao;
import com.woniuxy.entity.RbacRole;
import com.woniuxy.service.RbacRoleService;

import java.util.List;
import java.util.Map;


/**
 * service业务层代码，用于调用dao层接口
 */
public class RbacRoleServiceImpl implements RbacRoleService {
    private RbacRoleDao rbacRoleDao;

    public RbacRoleDao getRbacRoleDao() {
        return rbacRoleDao;
    }

    public void setRbacRoleDao(RbacRoleDao rbacRoleDao) {
        this.rbacRoleDao = rbacRoleDao;
    }

    @Override
    public int createOne(RbacRole rbacRole) {
        //额外的具体业务代码
        return rbacRoleDao.insertOne(rbacRole);
    }

    @Override
    public int removeOne(int id) {
        return rbacRoleDao.deleteOne(id);
    }

    @Override
    public int updateOne(RbacRole rbacRole) {
        return rbacRoleDao.updateOne(rbacRole);
    }

    @Override
    public RbacRole findOne(int id) {
        return rbacRoleDao.findOne(id);
    }

    @Override
    public List<Map<String, String>> findAll() {
        return rbacRoleDao.findAll();
    }

    @Override
    public List<RbacRole> findAllByObject() {
        return rbacRoleDao.findAllByObject();
    }

    @Override
    public List<RbacRole> search(RbacRole rbacRole) {
        return rbacRoleDao.search(rbacRole);
    }

}
